home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
uw_1.exe
/
UW_HELP1.HLP
< prev
next >
Wrap
Text File
|
1992-11-03
|
31KB
|
715 lines
`co(4,7);─────────────────────────── /// Structures/Globals ───────────────────────────`color();
┌──────────────────────────────────────────────────────────────────────────┐
│ `keyword(RECT,/// RECT); `keyword(WINDOW,/// WINDOW); │
│ `keyword(EVENT,/// EVENT); `keyword(M_RESET,/// M_RESET); │
│ `keyword(M_LOC,/// M_LOC); `keyword(M_MOVE,/// M_MOVE); │
│ `keyword(PRINT,/// PRINT); `keyword(MENU,/// MENU); │
│ `keyword(Video Globals,/// Video Globals); `keyword(Event Globals,/// Event Globals); │
│ `keyword(Default Attributes,/// Default Attributes); `keyword(Cursor Globals,/// Cursor Globals); │
│ `keyword(DesqView Globals,/// DesqView Globals); `keyword(Manager Globals,/// Manager Globals); │
│ `keyword(Function Globals,/// Function Globals); `keyword(Printer Globals,/// Printer Globals); │
│ `keyword(Timer Globals,/// Timer Globals); `keyword(Graphics Globals,/// Graphics Globals); │
│ `keyword(EGA/VGA Globals,/// EGA/VGA Globals); │
└──────────────────────────────────────────────────────────────────────────┘
These are the structures and global variables that are used in the
UltraWin library. The structures defined are used for windowing, mouse
and printer support. The globals are used for screen and video,
Desqview/Windows compatibility, graphics, timer and sound control,
background processing, dynamically queued RAM-based or disk-based
printing, and the window manager. Include the UW.H file for access to the
structures, and the UW_GLOBX.H file for access to the globals.
`co(10,1);/// RECT`co();
`co(11,1); typedef struct rect_struct
{
int x_min, x_max, y_min, y_max;
} RECT;`co();
This structure is used for general screen and window area definition,
and is used internally by the WINDOW structure. We supply several useful
rectangle functions you may wish to utilize in your own code. Refer to
the `keyword(Rectangle Functions,[uw_help4.hlp]/// Rectangle Functions); section for more information.
`co(10,1);/// WINDOW`co();
`co(15,?); typedef struct w_struct
{
struct w_struct *next; /* next window in linked list */
struct w_struct *previous; /* previous window in list */
RECT pane; /* the window rectangle */
RECT old_pane; /* for full size toggle */
int rows; /* save buffer rows and columns */
int cols;
int csr_x; /* the "soft" cursor location */
int csr_y;
uchar att; /* the window's attribute */
uchar bdr_att; /* the window's border attribute */
int bdr_style; /* the border style */
int name_loc; /* CENTERED, LEFTJUST, RIGHTJUST */
char *name; /* pointer to window name */
uchar *save; /* pointer to save buffer area */
uchar *buff; /* pointer to write buffer area */
uchar *mask; /* pointer to window buffer mask */
uchar *tabs; /* tab stops */
int reg_s, reg_e; /* scroll region start and end */
unsigned hidden : 1; /* 1 if window hidden */
unsigned overlapped : 1; /* 1 if window overlapped */
unsigned csr_adv : 1; /* 1 if cursor auto advanced */
unsigned inside : 1; /* 1 if bordered and inside */
unsigned mask_on : 1; /* 1 if window mask is active */
unsigned popup : 1; /* 1 if window is popup */
unsigned scroll : 1; /* 1 if window auto-scrolls */
unsigned bs_clear : 1; /* 1 if backspace is destructive */
unsigned eol_wrap : 1; /* 1 if cursor wraps at end of ln*/
unsigned mgr_flag : 1; /* 1 if win in manager's list */
unsigned set_flag : 1; /* 1 if window is set on screen */
unsigned cr_flag : 1; /* 1 if cr processed */
unsigned lf_flag : 1; /* 1 if lf processed */
unsigned cr_lf_flag : 1; /* 1 if cr or lf act as cr/lf */
unsigned bk_flag : 1; /* 1 if backspace processed */
unsigned tab_flag : 1; /* 1 if tab processed */
unsigned bell_flag : 1; /* 1 if bell char processed */
unsigned w_wrap : 1; /* 1 if word wrap on */
unsigned unused : 14;
void *usr_ptr; /* user expansion pointer */
uchar usr_exp[4]; /* user expansion space */
/* DO NOT USE BELOW VARIABLES */
void *sys_ptr; /* system expansion pointer */
uchar sys_exp[4]; /* system expansion space */
} WINDOW;`co();
This structure is used by the UltraWin library for all window
operations. The structure is used internally by the library, so the
information above is mainly shown to satisfy any curiosity.
Starting with version 2.00 of UltraWin, the tabs for the window are
allocated on window creation. The tabs are now as large as the width of
the window, saving space over the 132 bytes used by previous versions. You
will notice that starting with 2.00 both user-defined and system pointers
and expansion areas have been added. Please do not access the system
additions as we will be using these in future versions.
It is recommended that these structure elements be accessed by the
functions provided, where available, and not directly. This allows us to
change and enhance the package in the future while maintaining
compatibility with your code.
`co(10,1);/// EVENT`co();
`co(11,1); typedef struct event_struct
{
int is_mouse;
int key;
int mod;
int m_x, m_y;
int m_count, m_button;
} EVENT;`co();
This structure is used by the global variable "Event", which is used by
wait_event and event_pending to return information.
The "is_mouse" member is used as a boolean to indicate if the event was
a keyboard event (is_mouse=0) or a mouse event (is_mouse=1).
The "key" member will contain the key value, and the member "mod" will
contain bit settings to indicate if a key combination was used. This
includes the left and right shift combinations, Ctrl or Alt combinations,
and whether Scroll Lock, Num Lock, or Caps Lock are set (see UW_KEYS.H for
defines).
The "m_x" and "m_y" members will contain the x,y coordinate (from
0..V_cols-1 for x, 0..V_rows-1 for y) of the mouse event, "m_count" will
contain the number of presses, and "m_button" has the define for the
button pressed (LB, MB, or RB).
`co(10,1);/// M_RESET`co();
`co(11,1); typedef struct reset_struct
{
int exists;
int n_buttons;
} M_RESET;`co();
This structure is used internally by the init_mouse and end_mouse
functions. It is used when starting or ending the program, and when first
called returns whether or not the mouse is available. The function
init_mouse uses this structure to set the global Mouse_exists boolean
variable.
`co(10,1);/// M_LOC`co();
`co(11,1); typedef struct loc_struct
{
int button_status;
int count;
int col;
int row;
} M_LOC;`co();
This structure is used by m_pos, m_pressed, and m_released, as well as
internally by event_pending. If you want to handle the mouse yourself,
bypassing UltraWin's event handling capability, use the m_pos, m_pressed
and m_released functions to get mouse pressed and coordinate information
using a variable of type M_LOC.
`co(10,1);/// M_MOVE`co();
`co(11,1); typedef struct move_struct
{
int h_count;
int v_count;
} M_MOVE;`co();
This structure is used only by the m_motion function, which reports the
net movement of the mouse cursor between m_motion calls.
`co(10,1);/// MENU`co();
`co(1